package com.haifeng.jupiter.auth;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <p>
 *  主入口类
 * </p>
 * @Author: Haifeng
 * @Date: 2020-08-08
 */
@EnableDiscoveryClient
@MapperScan(basePackages = {"com.haifeng.jupiter.auth.mapper"})
@SpringBootApplication(scanBasePackages = {"com.haifeng.jupiter.auth"})
public class JupiterAuthApplication implements WebMvcConfigurer {

    public static void main(String[] args) {
        SpringApplication.run(JupiterAuthApplication.class, args);
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
    }

}
